package com.zky.action;


import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.ServletActionContext;

import com.zky.DAO.impl.Imp1DaoImp;
import com.zky.entity.Imp1;

public class IndexAction extends Imp1DaoImp{
    private Imp1 imp;

	public Imp1 getImp() {
		return imp;
	}

	public void setImp(Imp1 imp) {
		this.imp = imp;
	}

	public String indexHref() {
		try {
			HttpServletRequest request = ServletActionContext.getRequest();
			int id = Integer.parseInt(request.getParameter("id"));
			imp = this.findById(id);
			return "success";
		} catch (Exception e) {
			e.printStackTrace();
			return "false";
		}
	}

}
